<?php
/*
 * Created on Jun 5, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<h2>Product: Modify Multi Product</h2>
<div class="content-inner">
	<div class="product-cont">
		<form action="<?=site_url(array('c' => 'cms_product', 'm' => 'edit_multi_product'))?>" method="post" id="setForm">
			<table class="form-table" cellpadding="5" cellspacing="0" style="width: 450px;">
                <?php foreach($product_list as $product):?>
				<tbody>
					<tr>
				    	<th>Group: </th>
				    	<td>
							<select name="product_gid[]" class="input-text">
								<option value="">Please select</option>
								<?php foreach($groups as $item):?>
								<option value="<?=$item['id']?>" <?= $item['id']==$product['gid']? 'selected' : '';?>>
									<?=$item['name']?>
								</option>
								<?php endforeach;?>
							</select>
						</td>
				    </tr>
					<tr>
						<th>Title: </th>
						<td><input type="hidden" name="product_id[]" value="<?=$product['id']?>"/><input type="text" name="product_title[]" class="input-text required" value="<?=$product['title']?>"/></td>
						<td rowspan="3">							
							<img src="<?=$media_thumb['user_media_url'].$product['rawname'].$media_thumb['thumb_marker'].$product["fileext"]?>" alt="<?=$product['title']?>"/>
						</td>
					</tr>
					<tr>
                        <th>Keycode: </th>
						<td><input type="text" name="product_keycode[]" class="input-text required" value="<?=$product['keycode']?>"/></td>						
					</tr>
					<tr>
						<th>Price: </th>
						<td><input type="text" name="product_price[]" class="input-text required number" value="<?=number_format($product['price'],0,'','')?>"/> <span>VND</span></td>
					</tr>
					<tr>
						<th>Link: </th>
						<td><input type="text" name="product_link[]" class="input-text required link" value="<?=$product['link']?>"/></td>
					</tr> 
					<tr>
						<th>Description: </th>
						<td colspan="2">
							<textarea name="product_description[]" rows="3" cols="20" class="input-textarea"><?=$product['description']?></textarea>
						</td>
					</tr>
					<tr>
						<td colspan="3"><hr/></td>
					</tr>
				</tbody>
                <?php endforeach;?>
				<tbody>
					<tr>
						<th></th>
						<td>
							<input type="reset" class="" value="Cancel" />
							<input name="SaveProducts" type="submit" class="" value="Save" />
						</td>
					</tr>
				</tbody>
			</table>
		</form>	
	</div>
</div>